﻿<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/mescroll.js@1.4.1/mescroll.min.css">
    <script src="https://cdn.jsdelivr.net/npm/mescroll.js@1.4.1/mescroll.min.js" charset="utf-8"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>管理入口</title>
    <style>
        html, body {
            margin: 0;
            padding: 0;
        }

        .header {
            position: relative;
            background: #333;
            color: #fff;
            padding: 20px;
            display: -webkit-flex;
            display: flex;
            -webkit-align-items: center;
            align-items: center;
        }

        .header__info {
            -webkit-flex: 1;
            flex: 1;
            padding-left: 0px;
        }

        .header__nickname {
            font-size: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
        }

        .btn__box .weui-btn {
            margin-top: 0;
        }

        .mescroll {
            position: fixed;
            top: 0px;
            bottom: 0;
            height: auto; /*如设置bottom:50px,则需height:auto才能生效*/
        }

        .container {
            height: 100%;
            width: 100%;
            position: fixed;
            text-align: center;
        }
    </style>
</head>

<body style="background: #333">
<div class="container">
    <div id="mescroll" class="mescroll">
        <div>
            <div id="tap">
                <div class="header">
                    <div class="header__info">
                        <div class="header__nickname">平台红包统计</div>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>

</body>
<input id="nickName" type="hidden" th:value="${nickName}">
<input id="luckyCount" type="hidden" th:value="${luckyCount}">
<input id="remainingNumber" type="hidden" th:value="${remainingNumber}">
</html>
<script>
    var nickName = $('#nickName').val();
    var luckyCount = $('#luckyCount').val();
    var remainingNumber = $('#remainingNumber').val();

    $(document).ready(function() {
        $("#tap").append('<div class="header">' +
            '                <div class="header__info">' +
            '                    <div class="header__nickname">平台名称</div>' +
            '                </div>' +
            '                <div class="header__info">' +
            '                    <div class="header__nickname">' + nickName + '</div>' +
            '                </div>' +
            '            </div>'+
            '           <div class="header">' +
            '                <div class="header__info">' +
            '                    <div class="header__nickname">已用红包</div>' +
            '                </div>' +
            '                <div class="header__info">' +
            '                    <div class="header__nickname">' + luckyCount + '</div>' +
            '                </div>' +
            '            </div>' +
            '           <div class="header">' +
            '                <div class="header__info">' +
            '                    <div class="header__nickname">剩余红包</div>' +
            '                </div>' +
            '                <div class="header__info">' +
            '                    <div class="header__nickname">' + remainingNumber + '</div>' +
            '                </div>' +
            '            </div>')
    });


</script>
